#!/bin/bash

# tool
g++ tool/main.cc -o bin/merge.bin

# main
gcc src/plugin.c src/main.c -o bin/a.bin

# plugin
gcc -e plugin_main -nostartfiles src/aplugin.c -o bin/aplugin.bin

# merge
bin/merge.bin bin/a.out bin/a.bin 0x0000 bin/aplugin.bin 0x10000